package com.martini.satoken01.service;

import java.util.List;
import java.util.concurrent.TimeUnit;

/**
 * 缓存服务接口
 *
 * @author martini at 2021/12/18 21:59
 */
public interface CacheService {
    String info();
    void put(Object key, Object value);
    void put(Object key, Object value, long timeout, TimeUnit timeUnit);
    Object get(Object key);
    <T> T get(Object key, Class<T> classType);
    Long listLeftPush(String key, Object value);
    List<Object> listRange(String key, long start, long end);
    <T> List<T> listRange(String key, long start, long end, Class<T> classType);
    <T> T listIndex(String key, long index, Class<T> classType);
    Long listRemove(String key, long count, Object obj);
}
